2006-04-01 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtkfilesel.c (gtk_file_selection_get_filename): Use a GString
instead of static buffer to reduce .bss by 8kb. (#336784)
+2006-04-01 Behdad Esfahbod <behdad@gnome.org>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_get_filename): Use a GString
+ instead of static buffer to reduce .bss by 8kb. (#336784)
+
2006-04-01 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c (draw_hline): Emulate WinXP's
+2006-04-01 Behdad Esfahbod <behdad@gnome.org>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_get_filename): Use a GString
+ instead of static buffer to reduce .bss by 8kb. (#336784)
+
2006-04-01 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c (draw_hline): Emulate WinXP's
gtk_file_selection_get_filename (GtkFileSelection *filesel)
{
static const gchar nothing[2] = "";
- static gchar something[MAXPATHLEN*2+1];
+ static GString *something;
char *sys_filename;
const char *text;
g_free (fullname);
if (!sys_filename)
return nothing;
+ if (!something)
+ something = g_string_new (sys_filename);
+ else
+ g_string_assign (something, sys_filename);
strncpy (something, sys_filename, sizeof (something) - 1);
- something[sizeof (something) - 1] = '\0';
g_free (sys_filename);
- return something;
+
+ return something->str;
}
return nothing;